package cz.cvut.manatee.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.ServiceDefTarget;


public class Locator {
	private static RemoteServiceFrontendAsync service;
	
	public static RemoteServiceFrontendAsync getInstance() {
	    if (service == null) {
	    	service = (RemoteServiceFrontendAsync) GWT.create(RemoteServiceFrontend.class);

	        ServiceDefTarget endpoint = (ServiceDefTarget) service;
	        endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + "manateeRemoteService");
			
	    }
	    return service;
	}
}
